<?php class Tmpdebug { 

    /***
     * DB Fields: step
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     **/
    var $step;

    /***
     * DB Fields: text
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     **/
    var $text;

//--------------- GET METHODS ----------------------------- //
    /***
     * Get value for field: step
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @result step
     **/
    function get_step( ) {
        // returns the value of step
        return $this->step;
    }


    /***
     * Get value for field: text
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @result text
     **/
    function get_text( ) {
        // returns the value of text
        return $this->text;
    }


//--------------- SET METHODS ----------------------------- //
    /***
     * Set value for field: step
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param step
     * @result void
     **/
    function set_step( $step ) {
        // sets the value of step
        $this->step = $step;
    }

    /***
     * Set value for field: text
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param text
     * @result void
     **/
    function set_text( $text ) {
        // sets the value of text
        $this->text = $text;
    }

//--------------- CRUD METHODS ----------------------------- //
    /***
     * Create a new Record: tmpdebug
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param step
     * @param text
     * @result void
     **/
    function createnew_tmpdebug( $step, $text ) {

        // items to be inserted in the database 
        $_obj = array($step,
                      $text); 

        // database object connection
        $dbConn = $GLOBALS['dbConn'];

        // perform insert in the database
        $dbConn->insert("tmpdebug", $_obj);
    }

    /***
     * Retrived an existing record: tmpdebug
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param step
     * @result new Tmpdebug
     **/
    function get_tmpdebug( $step ) {

        // retrive the data
        $dbConn = $GLOBALS['dbConn'];

        // retrieved value in the database
        $_resultSet = $dbConn->doQuery("SELECT * FROM tmpdebug WHERE step = '$step'");

        $__tmpdebugObj = new tmpdebug();
        // return the retrived from the database

        // create a new object
        $__obj = new Tmpdebug();
        $__obj->set_step($_resultSet[0]['step']);
        $__obj->set_text($_resultSet[0]['text']);


        return $__obj;
    }

    /***
     * Update an existing record: tmpdebug
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param step
     * @param itemsToBeUpdated = array()
     * @result void
     **/
    function update_tmpdebug( $step, $itemsToBeUpdated = array() ) {

         // get database connection
         $dbConn = $GLOBALS['dbConn'];

         // performs update in the database
         foreach($itemsToBeUpdated as $_fName => $_fVal) { 
               $dbConn->addValuePair($_fName, $_fVal);
         }

         // perform update operation
         $dbConn->update("tmpdebug", "step = '$step'");
    }

    /***
     * Delete an existing record: tmpdebug
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param step
     * @result void
     **/
    function delete_tmpdebug( $step ) {

         // get database connection
         $dbConn = $GLOBALS['dbConn'];

         // performs deletion of data
         $dbConn->delete("tmpdebug", "step = '$step'");
    }

    /***
     * Retrived list of objects base on a given parameters: tmpdebug
     *
     *
     * THIS IS a generated method using the DBClassGenerator 
     * created by John paul de Guzman <jpdguzman@gmail.com> 
     *
     * @param conditionalStatement = ''
     * @result collection of objects: Tmpdebug
     **/
    function list_tmpdebug( $conditionalStatement = '' ) {

         $dbConn = $GLOBALS['dbConn'];
         // check if there is a given parameter list
         if(!empty($conditionalStatement)) { 
              $sqlStatement = "SELECT * FROM tmpdebug WHERE $conditionalStatement"; 
         } else { 
              $sqlStatement = "SELECT * FROM tmpdebug";
         }

         // retrieve the values base on the query result
         $__resObj = $dbConn->doQuery($sqlStatement);

         $__collectionOfObjects = array();
         foreach($__resObj as $__rs) { 
            $__newObj = new Tmpdebug();

            $__newObj->set_step($__rs['step']);
            $__newObj->set_text($__rs['text']);

            // add object to collection 
            array_push($__collectionOfObjects, $__newObj);
         }

         // return collection of objects
         return $__collectionOfObjects;
    }

} ?>